#include <stdio.h>

int main() {
  float salary;
  scanf("%f", &salary);
  
  float k = 0;

  if (salary <= 3000) {
    k = 0.005f;
  } else if (salary <= 5000) {
    k = 0.01f;
  } else if (salary <= 10000) {
    k = 0.015f;
  } else {
    k = 0.02f;
  }

  printf("%.1f", salary * k);
}